﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zian.WinForm.Framework.Commons;
using Zian.WinForm.Framework.Mappers;

namespace ZhiQianWinform.Entities
{
    [ClassMapper(Name = "测试", Addable = true)]
    public class TestEntity : BaseEntity
    {
        public TestEntity()
        {

        }
        // 常量定义部分
        // 主键
        public const string __ID = "Id";
        // 姓名
        public const string __REALNAME = "RealName";
        // 年龄
        public const string __AGE = "Age";
        // 局部变量定义部分
        // 主键
        private int? m_Id;
        // 姓名
        private string m_RealName;
        // 年龄
        private int? m_Age;
        // 属性定义部分
        // 主键
        [PropertyMapper(Name = "主键", IsPk = true, Sort = 10)]
        public int? Id { get { return this.m_Id; } set { this.m_Id = value; } }
        // 姓名
        [PropertyMapper(Name = "姓名", Sort = 20, Queryable = true, Nullable = false)]
        public string RealName { get { return this.m_RealName; } set { this.m_RealName = value; } }
        // 年龄
        [PropertyMapper(Name = "年龄", Sort = 40, EditType = Sunny.UI.UITextBox.UIEditType.Integer)]
        public int? Age { get { return this.m_Age; } set { this.m_Age = value; } }

        public override object PrimKey => Id;

        public override string LabelName => RealName;
    }
}
